package com.easyweb.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
 
import javax.persistence.Table;

import org.hibernate.annotations.NamedQueries;
import org.hibernate.annotations.NamedQuery;
import org.hibernate.validator.NotNull;

@Entity
@NamedQueries({@NamedQuery(name="ayrilmaNedenKodlariTumKayitlar",query="select a from AyrilmaKodlari a order by a.adi") })
@Table
public class AyrilmaKodlari {

	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private long id;
	
	@Column(nullable=false)
	@NotNull(message="#{messages.errBosOlamaz}")
	private String adi;
	
	public AyrilmaKodlari() {
		// TODO Auto-generated constructor stub
	}

	
	public AyrilmaKodlari(long id, String adi) {
		super();
		this.id = id;
		this.adi = adi;
	}
 	public long getId() {
		return id;
	}
 
	public String getAdi() {
		return adi;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setAdi(String adi) {
		this.adi = adi;
	}
	
	
	
	
}
